import SwiftUI

/*
 * 标签示例
 */
class LabelExample: FCUIView{
    /*
     * 初始化布局
     */
    override func onLoad(){
        let isInit = super.m_isInit
        super.onLoad()
        if !isInit{
            m_paint.defaultUIStyle = "light"
            let width = Double(self.frame.size.width), height = Double(self.frame.size.height)
            renderFaceCat(name:"labelexample", paint: m_paint, size: FCSize(cx:width, cy:height))
            let tabPage = findViewByName(name:"TabPage2", views:m_paint.views)
            let label = FCLabel()
            label.location = FCPoint(x:100, y:100)
            label.size = FCSize(cx:100, cy:20)
            addViewToParent(view:label, parent:tabPage)
            label.text = "标签"
        }
    }
}
